[LIBXC] Remove unused xc_evtchn_status().
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 14 Aug 2006 15:39:35 +0000 (16:39 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 14 Aug 2006 15:39:35 +0000 (16:39 +0100)
Signed-off-by: John Levon <john.levon@sun.com>
tools/libxc/xc_evtchn.c
tools/libxc/xenctrl.h
tools/python/xen/lowlevel/xc/xc.c

index e43d210fafabab506000204cf5b5a37d22049293..8192a73c4b68c2dc3252f795c464378dc14da0af 100644 (file)
@@ -49,14 +49,3 @@ int xc_evtchn_alloc_unbound(int xc_handle,
 
     return rc;
 }
-
-
-int xc_evtchn_status(int xc_handle,
-                     uint32_t dom,
-                     evtchn_port_t port,
-                     xc_evtchn_status_t *status)
-{
-    status->dom  = (domid_t)dom;
-    status->port = port;
-    return do_evtchn_op(xc_handle, EVTCHNOP_status, status, sizeof(*status));
-}
index 58bf7b2dcb67ab55d32e294d0d099da46820034b..2d301b2c43c9f5089e3d5210fa4e2a6ae56e6da7 100644 (file)
@@ -367,8 +367,6 @@ int xc_sched_credit_domain_get(int xc_handle,
                                uint32_t domid,
                                struct sched_credit_adjdom *sdom);
 
-typedef evtchn_status_t xc_evtchn_status_t;
-
 /*
  * EVENT CHANNEL FUNCTIONS
  */
@@ -387,11 +385,6 @@ int xc_evtchn_alloc_unbound(int xc_handle,
                             uint32_t dom,
                             uint32_t remote_dom);
 
-int xc_evtchn_status(int xc_handle,
-                     uint32_t dom, /* may be DOMID_SELF */
-                     evtchn_port_t port,
-                     xc_evtchn_status_t *status);
-
 int xc_physdev_pci_access_modify(int xc_handle,
                                  uint32_t domid,
                                  int bus,
index 9dd7cc07f0dfc02757ba641ef37802bba41f1f24..3e5a9624d8f2644c7fce43298fa14137abae04b8 100644 (file)
@@ -484,60 +484,6 @@ static PyObject *pyxc_evtchn_alloc_unbound(XcObject *self,
     return PyInt_FromLong(port);
 }
 
-static PyObject *pyxc_evtchn_status(XcObject *self,
-                                    PyObject *args,
-                                    PyObject *kwds)
-{
-    PyObject *dict;
-
-    uint32_t dom = DOMID_SELF;
-    int port, ret;
-    xc_evtchn_status_t status;
-
-    static char *kwd_list[] = { "port", "dom", NULL };
-
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwd_list, 
-                                      &port, &dom) )
-        return NULL;
-
-    ret = xc_evtchn_status(self->xc_handle, dom, port, &status);
-    if ( ret != 0 )
-        return PyErr_SetFromErrno(xc_error);
-
-    switch ( status.status )
-    {
-    case EVTCHNSTAT_closed:
-        dict = Py_BuildValue("{s:s}", 
-                             "status", "closed");
-        break;
-    case EVTCHNSTAT_unbound:
-        dict = Py_BuildValue("{s:s}", 
-                             "status", "unbound");
-        break;
-    case EVTCHNSTAT_interdomain:
-        dict = Py_BuildValue("{s:s,s:i,s:i}", 
-                             "status", "interdomain",
-                             "dom", status.u.interdomain.dom,
-                             "port", status.u.interdomain.port);
-        break;
-    case EVTCHNSTAT_pirq:
-        dict = Py_BuildValue("{s:s,s:i}", 
-                             "status", "pirq",
-                             "irq", status.u.pirq);
-        break;
-    case EVTCHNSTAT_virq:
-        dict = Py_BuildValue("{s:s,s:i}", 
-                             "status", "virq",
-                             "irq", status.u.virq);
-        break;
-    default:
-        dict = Py_BuildValue("{}");
-        break;
-    }
-    
-    return dict;
-}
-
 static PyObject *pyxc_physdev_pci_access_modify(XcObject *self,
                                                 PyObject *args,
                                                 PyObject *kwds)
@@ -1141,21 +1087,6 @@ static PyMethodDef pyxc_methods[] = {
       " remote_dom [int]: Remote domain to accept connections from.\n\n"
       "Returns: [int] Unbound event-channel port.\n" },
 
-    { "evtchn_status", 
-      (PyCFunction)pyxc_evtchn_status, 
-      METH_VARARGS | METH_KEYWORDS, "\n"
-      "Query the status of an event channel.\n"
-      " dom  [int, SELF]: Dom-id of one endpoint of the channel.\n"
-      " port [int]:       Port-id of one endpoint of the channel.\n\n"
-      "Returns: [dict] dictionary is empty on failure.\n"
-      " status [str]:  'closed', 'unbound', 'interdomain', 'pirq',"
-      " or 'virq'.\n"
-      "The following are returned if 'status' is 'interdomain':\n"
-      " dom  [int]: Dom-id of remote endpoint.\n"
-      " port [int]: Port-id of remote endpoint.\n"
-      "The following are returned if 'status' is 'pirq' or 'virq':\n"
-      " irq  [int]: IRQ number.\n" },
-
     { "physdev_pci_access_modify",
       (PyCFunction)pyxc_physdev_pci_access_modify,
       METH_VARARGS | METH_KEYWORDS, "\n"